<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>新增施工人员</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link rel="stylesheet" href="css/bootstrap.css">
	<link rel="stylesheet" type="text/css"
		href="static/h-ui/css/H-ui.min.css" />
	<link href="js/select2/select2.min.css" type="text/css" rel="stylesheet" />
	
	<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
	<script src="js/select2/select2.min.js"></script>
	<script type="text/javascript"
	src="<%=basePath%>js/My97DatePicker/WdatePicker.js"></script>
	<link rel="stylesheet" type="text/css"
	href="js/webuploader-0.1.5/webuploader.css" />
<script type="text/javascript" src="js/webuploader-0.1.5/webuploader.js"></script>
<script type="text/javascript" src="js/sharefunction.js"></script>

	<style type="text/css">
		.td_l{
			text-align: center;
			width:121px;
		}
		.td_c_l{
			text-align: center;
			width:121px;
		}
		.td_i{
			padding: 0;
		}
		td{
			padding: 5px;
		}
		.input-width{
			width:200px;
		}
		
		.end_sub{
			margin-left: 40%;
		}
		#id_label_multiple,#s2_RoadworkList{
			width:200px;
		}
		input {
		    border: 1px solid #ace;
		    border-radius: 5px;
		    height: 25px;
		}
	</style>
	
	
	
	<script type="text/javascript">
		$(function(){
			//初始化人员类型
			$("#id_label_multiple").select2();
			
			initSelect2InDecorateScheme();
		});

		function initSelect2InDecorateScheme(){
			//查询所有施工单位
			$.getJSON("project/decorateScheme/getRoadWorkAll",function(data, status) {
				//初始化select2插件
				var $s2=$("#s2_RoadworkList").select2();
				//向插件中填充数据
				for(var i=0;i<data.length;i++){
					$("#s2_RoadworkList").append("<option value="+data[i].id+">"+data[i].companyName+"</option>");
					if(i==0){
						$s2.val(data[i].id).trigger("change");
					}
				}
			});
		}
	</script>

  </head>
  
  <body>
    <div>
		<!-- 表单开始 -->
		<form action="project/decorateScheme/addRoadWorkPerson" method="post">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h5 class="panel-title">施工人员</h5>
				</div>
				<div class="panel-body ">
					<table>
						<tr>
							<td class="td_l">人员类型</td>
							<td>
								<select name="personType" class="js-example-basic-single" id="id_label_multiple" >
									<option value="two">专业工种</option>
									<option value="three">管理人员</option>
								</select>
							</td>
							
							<td class="td_l">施工单位</td>
							<td>
								<select name="fkconstructionCompanyId" class="js-example-basic-single" id="s2_RoadworkList" >
								</select>
							</td>
						</tr>
						<tr>
							<td class="td_l">姓名</td>
							<td >
								<input type="text" id="text_input"
								name="personName" class="input-width input-text radius size-MINI" />
							</td>
						</tr>
						<tr>
							<td class="td_i" colspan="2">
								<!-- 附件上传 -->
								<%@include file="../../p_utilePage/Article.jsp" %>
							</td>
						</tr>
					</table>
				</div>
				<!-- 专项申报 -->
			</div>
			
			<div>
				<!-- 提交按钮 -->
				<button class="btn btn-primary radius end_sub" type="submit">保 存</button>&nbsp;
				<a class="btn btn-default radius" onclick="javascript:window.history.go(-1)"> 取 消 </a>
			</div>
		</form>
		<!-- 表单结束 -->
	</div>
  </body>
</html>
